package com.shuke.medical.insure.eums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/***
 * @title InfCodeEnum
 * @description
 * @author woo hua
 * @version 1.0.0
 * @create 2023/3/22 17:05
 **/
@AllArgsConstructor
public enum InfCodeEnum {

    SUCCESS(0, "成功"),
    FAIL(-1, "失败"),
    NO_LOGIN(-9, "未登录");

    @Getter
    private Integer STATUS;
    @Getter
    private String VALUE;

    public static InfCodeEnum getByStatus(Integer status) {
        for (InfCodeEnum value : InfCodeEnum.values()) {
            if(value.getSTATUS().equals(status)) {
                return value;
            }
        }
        return null;
    }
}
